<template>
  <div>
    <h1>Home</h1>
    <div>
      <button @click="$router.back()">回退</button>
      <button @click="$router.forward()">前进</button>
      <button @click="$router.go(-2)">回退2</button>
    </div>
    <div>
      <button @click="toNews">新闻</button>
      <button @click="toMusic">音乐</button>
      <button @click="toPay">娱乐</button>
    </div>
    <div></div>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: "Home",
  methods: {
    toNews() {
      this.$router.push("/home/news");
    },
    toMusic() {
      this.$router.push("/home/music");
    },
    toPay() {
      this.$router.push("/home/pay");
    },
  },
};
</script>

<style scoped></style>
